package com.example.service;

import com.example.mapper.IdentityMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class IdentityService {
    private final IdentityMapper identityMapper;
    @Autowired
    public  IdentityService(IdentityMapper identityMapper){
        this.identityMapper=identityMapper;
    }
    public int identity(String number){
        System.out.println(identityMapper.identityTeacher(number));
        if (identityMapper.identityTeacher(number)!=null && identityMapper.identityTeacher(number).equals("老师")){
            return 0;
        }else {
            return 1;
        }
    }
}
